﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace Vit.Web.Providers
{
    public interface IDataProvider<T> : Vit.Common.IProvider where T : class
    {
        void Configuration(bool enableLazyLoading, bool enableObjectTracking);
        IQueryable<T> GetAll();
        IQueryable<T> Search(FormCollection conditions);
        FormCollection InitialSearchConditions();
        object[] GetKeys(T obj);
        T GetByKeys(params object[] ids);
        T New();
        T SetDefaultValues(T obj);
        T Insert(T obj);
        T Modify(T obj);
        void Delete(T obj);
    }
}
